import request from '@/utils/request.js';

// 注册
export const reqRegister = data => request({ url: '/login/register', method: 'POST', data });
// 获取短信验证码
export const reqCode = data => request({ url: '/login/getCaptcha', method: 'GET', params: data });
// 登录
export const reqLogin = data => request({ url: '/login/loginAuth', method: 'POST', data });
// 重置密码
export const reqResetPwd = data => request({ url: '/login/forgotPWD', method: 'POST', data });
// 新增门店档案
export const reqAddShop = data => request({ url: '/store/insert', method: 'POST', data });
// 获取门店信息
export const reqShopInfo = () => request({ url: '/store/getByUser', method: 'GET' });
// 新增收货地址
export const reqAddAddress = data => request({ url: '/address/insert', method: 'POST', data });
// 查询收货地址
export const reqAddressList = data => request({ url: '/address/select', method: 'GET', data });
// 查询个人信息相关信息
export const reqUserInfo = () => request({ url: '/user/getMyInfo', method: 'GET' });
// 查询收货地址详情
export const reqAddressDetail = data => request({ url: '/address/details', method: 'GET', data });
// 修改收货地址
export const reqUpdateAddress = data => request({ url: '/address/update', method: 'PUT', data });
// 删除收货地址
export const reqDeleteAddress = data => request({ url: '/address/delete', method: 'DELETE', data });
// 重新提交审核门店档案
export const reqUpdateShopInfo = data => request({ url: '/store/resubmit', method: 'PUT', data });
// 获取用户状态
export const reqGetUserStatus = data => request({ url: '/login/getStatus', method: 'GET', params: data });
// 退出登录
export const reqLogout = data => request({ url: '/user/logout', method: 'POST', data });
// 获取协议
export const reqAgreement = data => request({ url: '/agreement/select', method: 'GET', params: data });
// 修改密码
export const reqUpdatePwd = data => request({ url: '/user/updatePWD', method: 'PUT', data });